import 'package:eyepetizer_example/state/base_list_state.dart';
import 'package:eyepetizer_example/viewmodel/discovery/follow_viewmodel.dart';
import 'package:flutter/material.dart';

import '../../model/common_item.dart';
import 'follow_item_widget.dart';

class FollowPage extends StatefulWidget {
  const FollowPage({Key? key}) : super(key: key);

  @override
  State<FollowPage> createState() => _FollowPageState();
}

class _FollowPageState extends BaseListState<ItemList,FollowViewModel,FollowPage> {
  @override
  Widget getContentChild(FollowViewModel model) => ListView.separated(
    separatorBuilder: (context, index) => const Divider(height: 0.5,),
    itemCount: model.itemList.length,
    itemBuilder: (context, index){
      return FollowItemWidget(item:model.itemList[index]);
    },
  );

  @override
  FollowViewModel get viewModel => FollowViewModel();
}
